#include "ALPFAST.h"


CALPFAST::CALPFAST()
{
}

CALPFAST::CALPFAST(CALStepItem* pStepItem)
{
	m_pStepItem = pStepItem;
}

CALPFAST::~CALPFAST()
{
}


void CALPFAST::test()
{

}
void CALPFAST::convert()
{
	if (m_pStepItem == NULL) return;

	try
	{
		CALSIPFAST* pStepItem = (CALSIPFAST*)m_pStepItem;

		if (pStepItem != NULL)
		{
			int threshold = pStepItem->GetItemThreshold();

			bool nonmaxSuppression = pStepItem->GetItemNonmaxSuppression();
			FastFeatureDetector::DetectorType type = (FastFeatureDetector::DetectorType)pStepItem->GetItemType();

			std::vector<KeyPoint> keyPoints;
			Ptr<FastFeatureDetector> fast = FastFeatureDetector::create(threshold, nonmaxSuppression, type);
			fast->detect(m_srcMat, keyPoints);

			drawKeypoints(m_srcMat, keyPoints, m_dstMat, Scalar::all(255), DrawMatchesFlags::DEFAULT);

			SetDstType(AL_DST_Mat_One);
		}

	}
	catch (...)
	{

	}
}

void CALPFAST::convert(const Mat &src, Mat &dst)
{

}